package jt.classic.system.workflow.impl;

import jt.classic.system.workflow.WTrend;

import org.limp.basework.AbstractSimpleBean;

import org.limp.mine.StringTool;

import java.util.Map;


/**
 * 流程环节流向接口实现�?
 *
 * @author bizkit
 *
 */
public class WTrendImpl extends AbstractSimpleBean implements WTrend {
    private String stepid;
    private String trendid;
    private int sort;
    private int stepno;
    private int trendno;
    private String name;
    private boolean select;

    public int isort() {
        // TODO Auto-generated method stub
        return this.sort;
    }

    public String istepid() {
        // TODO Auto-generated method stub
        return this.stepid;
    }

    public int istepno() {
        return this.stepno;
    }

    public int itrendno() {
        return this.trendno;
    }

    public String itrendid() {
        // TODO Auto-generated method stub
        return this.trendid;
    }

    public String itrendname() {
        // TODO Auto-generated method stub
        return this.name;
    }

    public boolean iselect() {
        return this.select;
    }

    public String iobjkey() {
        return null;
    }

    public void reload(Map info) {
        super.reload(info);

        this.name = (String) info.get("TREND_NAME");
        this.stepid = (String) info.get("S_ID");
        this.trendid = (String) info.get("TREND_ID");
        this.sort = Integer.parseInt((String) info.get("TREND_SORT"));
        this.select = Integer.parseInt(StringTool.checkString(info.get(
                        "TREND_SELECT"), "0")) == 1;

        this.stepno = Integer.parseInt(StringTool.checkString(info.get("S_NO"),
                    "0"));
        this.trendno = Integer.parseInt(StringTool.checkString(info.get("T_NO"),
                    "0"));
    }
}
